﻿@model IEnumerable<PrjAssess.Models.Service.AssessProject.PrjItem>

@{
    ViewBag.Title = "Index";
}
@section scripts{
      <script type="text/javascript">
          $(function () {
              $('.list-group-item').hover(function ()
              {
                  $(this).toggleClass("active");
              });
              $('.list-group-item').on('click', function(eventObject)
              {
                  eventObject.preventDefault();
                  var url = '@Url.Action("SetCurPrj", "ProjectManage")';
                  var prjId = $(this).attr('href');
                  var prjName = $(this).find('h5').text();
                  $.post(url, { 'prjId': prjId, 'prjName': prjName }, function (data)
                  {
                      if (data == "1")
                      {
                          $('#prjDialog').modal('hide');
                          window.location.href = '@Url.Action("Index","DoAssess")';
                      }
                      else
                      {
                          alert('erro in setting cur prj!');
                      }

                  }
                 );
              }
              );
          });
      </script>
}

<div class="container">
    <div class="page-header">
        <h3>尚未选择工程 <small>请选择一个工程来开始你的操作........</small></h3>

    </div>
   <div style="width:100%;height:2px;background-color:#169dd8;"></div>
    <div class="list-group">
        @foreach (var item in Model)
        {
            <a href="@item.Id" class="list-group-item">
                <h5>@item.Name</h5>
                <p class="list-group-item-text">
                               
                    <span class="text-muted">@item.Adress</span>
        
                    <span class="text-muted pull-right">
                        @item.AssessDate.ToString("yyyy-MM-dd")
                    </span>
                </p>
            </a>
        }
       
    
    </div>
</div>



